package com.shf.entity;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

/**
 * (Syslog)实体类
 *
 * @author makejava
 * @since 2023-10-17 17:14:12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("sySlog")
public class Syslog {


    private String id;

    private Date visitTime;

    private String username;

    private String ip;

    private String url;

    private long executionTime;

    private String method;
    /**展示访问时间文本*/
    private String visitTimeStr;


    public String getVisitTimeStr() {

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        if (visitTime != null){
            visitTimeStr = simpleDateFormat.format(visitTime);
        }
        return visitTimeStr;
    }
}

